{% extends 'base.html' %}

{% block title %}Home at the Energy Island Management Game{% endblock title %}

{% block head %}
	<script language="javascript">

  document.observe("dom:loaded", function(){
		$('id_username').focus();
  });

  </script>
{% endblock head %}

{% block body %}

	{% if failed %}
	<div class="post">
		<div class="post-bgtop">
			<div class="post-bgbtm">
				<h1 class="title"> Login Failed </h1>
				<div class="entry">
					De inloggegevens die je hebt ingevuld zijn niet correct.
				</div>
			</div>
		</div>
	</div>
	{% endif %}
	
	
	<div class="post">
		<div class="post-bgtop">
			<div class="post-bgbtm">
				<h1 class="title"> Login 
				<div style="background-image:url('{{ MEDIA_URL }}img/user.jpg');height:48px;width:48px;float:left;background-repeat: no-repeat;"></div>
				</h1>
				<div class="entry">
					<form enctype="multipart/form-data" method="post" style="margin:auto;display:block;" action="{{ BASE_PATH }}login/">
						<div>
							<table>
								<tr>
									<td><label for="id_username">Username:</label></td>
									<td>{{ form.username }}</td>
								</tr>
								<tr>
									<td><label for="id_password">Password:</label></td>
									<td>{{ form.password }}</td>
								</tr>
							</table>
						</div>
						<div style="background-image:url('{{ MEDIA_URL }}img/clock.jpg');height:32px;width:32px;float:left;clear:both;"></div>
						{{form.expiration}}
						<input type="submit" value="Login" />
					</form>
				</div>
			</div>
		</div>
	</div>
{% endblock body %}
